/********************************************************************
	created:	2008/06/11
	created:	11:6:2008   14:43
	filename: 	SkinProgressCtrl.h
	author:		Dean
	
	purpose:	
*********************************************************************/
#pragma once

#include "SkinControl.h"

// CSkinProgressCtrl

class CSkinProgressCtrl 
	: public CButton
	, public CSkinControl
{
	DECLARE_DYNAMIC(CSkinProgressCtrl)

public:
	CSkinProgressCtrl();
	virtual ~CSkinProgressCtrl();

	INT GetPos() const { return m_nPos; }
	void SetPos(INT val);
	BOOL SetTooltip(LPCTSTR lpszText);
protected:
	DECLARE_MESSAGE_MAP()
protected:
	virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
	virtual BOOL CreateInternal(const RECT& rect, CWnd* pParentWnd, UINT nID);
	virtual BOOL LoadSkinImage(LPCTSTR lpszFilename);
	virtual void DrawIt (Gdiplus::Bitmap* pbmWnd, const RECT& rect);
	virtual CRect GetPlacement(const INT cxFrame, const INT cyFrame);

private:
	Gdiplus::Bitmap*	m_pBitmaps[2];
	Gdiplus::Bitmap*&	m_pImgZero, *&m_pImgFull;
	CToolTipCtrl		m_ctrlTooltip;
	INT					m_nPos;
public:
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
};


